import request from '@/utils/request'

// 素材中心列表
export function listMaterialList(query) {
  return request({
    url: '/material/pageData',
    method: 'get',
    params: query
  })
}
// 添加素材
export function addMaterial(data) {
  return request({
    url: '/material/addMaterial',
    method: 'post',
    data
  })
}
export function editMaterial(data) {
  return request({
    url: '/material/editMaterial',
    method: 'post',
    data
  })
}
// 素材详情
export function detailMaterial(data) {
  return request({
    url: '/material/detail',
    method: 'get',
    params: data
  })
}
// 删除素材
export function deleteMaterial(data) {
  return request({
    url: '/material/batchDelete/'+data,
    method: 'delete',
  })
}
// 删除音频
export function deleteAiPersonAudio(data) {
  return request({
    url: '/AiPersonAudioModelController/batchDelete/'+data,
    method: 'delete',
  })
}
// 系统音色列表
export function listAiPersonAudio(query) {
  return request({
    url: '/AiPersonAudioModelController/pageData',
    method: 'get',
    params: query
  })
}

// 提交音色模型训练
export function submitAudioModelTrainning(data) {
  return request({
    url: '/AiPersonAudioModelController/submitAudioModelTrainning',
    method: 'post',
    data
  })
}

// 修改音色模型名称和标签
export function editAudioModelNameAndTags(data) {
  return request({
    url: '/AiPersonAudioModelController/editAudioModelNameAndTags',
    method: 'get',
    params:data
  })
}
// 详情音色
export function detailAudioModel(data) {
  return request({
    url: '/AiPersonAudioModelController/detail',
    method: 'get',
    params: data
  })
}